import {BrowserRouter, Navigate, Route, Routes} from 'react-router-dom';
import adminRoutes from './adminRoutes';
import frontRoutes from './frontRoutes';
import React from "react";

const Router = () => (
    <Routes>
        {frontRoutes}
        {adminRoutes}
        <Route path="/" element={<Navigate to="/dashboard" replace/>}/>
        <Route key="notfound" path="/NotFound" element={<Navigate to="/" replace/>}/>,
        <Route key="catchall" path="*" element={<Navigate to="/NotFound" replace/>}/>,
    </Routes>
);

export default Router;
